import request from "@/utils/request";

export async function login(data) {
    return await new request({
        url: '/api/user/user/login',
        method: 'POST',
        data
    })
}

export async function getUserAllInfoById(id) {
    return await new request({
        url: `/api/user/user/${id}`,
        method: 'GET',
    })
}

export async function modifyUserBaseInfo(id, data){
    return await new request({
        url: `/api/user/user/base/${id}`,
        method: "POST",
        data
    })
}

export async function modifyUserElseInfo(id, data){
    return await new request({
        url: `/api/user/user/else/${id}`,
        method: "POST",
        data
    })
}

export async function queryUserDeliveredCareersByUserId(id) {
    return await new request({
        url: `/api/user/user/deliver/${id}`,
        method: 'GET',
    })
}

export async function getDeliverHistoryById(id) {
    return await new request({
        url: `/api/user/user/history/${id}`,
        method: 'GET',
    })
}

export async function withdrawDeliverHistory(id) {
    return await new request({
        url: `/api/user/user/deliver/remove/${id}`,
        method: 'DELETE',
    })
}



